home *** CD-ROM | disk | FTP | other *** search
- getNum = function(n, obj, num_mc, width)
- {
- _root.score_n = n;
- trace(_root.score_n);
- var numStr;
- numStr = String(n);
- for(name in obj)
- {
- if(typeof obj[name] == "movieclip")
- {
- obj[name].removeMovieClip();
- }
- }
- i = 0;
- while(i < numStr.length)
- {
- t = Number(numStr.charAt(i));
- obj.attachMovie(num_mc,num_mc + i,i + 5);
- with(obj[num_mc + i])
- {
- _x = i * width;
- gotoAndStop(t + 1);
- }
- i++;
- }
- };
- trace("score2:" + _root.score);
- getNum(_root.score,obj,"mynum",12);
-